<html>
<head>
	<title>Native Database Protocol Support</title>
	<link rel="stylesheet" href="../css/styles.css">
</head>
<body>
<h1>Native Database Protocol Support</h1>

<p>Solves - "I need a transparent, sever-only MySQL/MariaDB or PostgreSQL proxy with features like <a href="connectionpooling.html">Connection Pooling</a>, <a href="throttling.html">Throttling</a>, <a href="ha.html">High Availability</a>, <a href="queryrouting.html">Query Routing</a>, <a href="queryfiltering.html">Query Filtering</a>, and <a href="schedules.html">Connection Schedules</a>" and "I wrote my app using the native MySQL/MariaDB/PostgreSQL API but the company is migrating to Oracle. I can tweak the queries to work with Oracle but I really don't want to have to modify the app to use OCI."</p>

<p>Native database apps communicate with the database using native database client-server protocols.</p>

<p>For example, MySQL/MariaDB apps communicate with the database using the MySQL/MariaDB client-server protocol:</p>

<p><img src="../images/mysqlnativeprotocol.png"/></p>

<p>...and PostgreSQL apps communicate with the database using the PostgreSQL client-server protocol:</p>

<p><img src="../images/postgresqlnativeprotocol.png"/></p>

<p>Whether written using the native SQL Relay API or a connector of some sort, SQL Relay apps generally communicate with SQL Relay using the SQL Relay client-server protocol:</p>

<p><img src="../images/sqlrelaynativeprotocol.png"/></p>

<p>However, SQL Relay also supports the MySQL/MariaDB and PostgreSQL client-server protocols.  This allows apps written for those databases to communicate with SQL Relay, rather than directly with the native database, without modification.</p>

<p><img src="../images/sqlrelaymysqlprotocol.png"/>
<br/>
<br/>
<img src="../images/sqlrelaypostgresqlprotocol.png"/></p>

<p>In this configuration, SQL Relay becomes a transparent proxy.  Native apps aimed at SQL Relay still think that they're talking to the database, but in fact, are talking to SQL Relay.  Once the app is talking to SQL Relay, most of SQL Relay's features become available to the app, including <a href="connectionpooling.html">Connection Pooling</a>, <a href="throttling.html">Throttling</a>, <a href="ha.html">High Availability</a>, <a href="queryrouting.html">Query Routing</a>, <a href="queryfiltering.html">Query Filtering</a>, and <a href="schedules.html">Connection Schedules</a>.  Since SQL Relay supports a variety of database backends, the app can also be redirected to any of these databases, instead of the database it was originally written to use.</p>

Some queries may have to be modified to use the syntax of the new database and some code may need to be changed, but a full rewrite of the app should not be necessary.
</body>
</html>
